package com.liangzai.spring.demo.service;

import com.liangzai.spring.demo.mapper.MessageMapper;
import com.liangzai.spring.demo.model.Message;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class MessageService {
    @Autowired
    MessageMapper messageMapper;

    public void addmessage(Message messageInfo) {
        messageMapper.insertmessage(messageInfo);
    }

    public List<Message> showmessage() {
        return messageMapper.selectAll();
    }
}
